<!--
 * @Description: background
 * @Author: rendc
 * @Date: 2022-09-22 09:30:10
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-22 10:30:08
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>background</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    #main{
      height: 100vh;
      /* background-color: cornsilk; */
      /* 背景图片 */
      background-image: url('./img/bg.png');
      /* 设置背景图片重复 */
      /* background-repeat: repeat; */
      /* background-repeat: repeat-y; */
      /* background-repeat: repeat-x; */
      /* background-repeat: no-repeat; */
      /* 设置图片大小 */
      /* background-size: 100px 100px; */
      /* 拉伸图片 */
      /* 按照容器最大边扩展 */
      background-size: cover;   
      /* 按照容器小大边扩展 */
      /* background-size: contain; */
      /* 宽高都拉伸 */
      background-size: 100% 100%;
      /* 图片开始绘制的区域 第一个默认 */
      /* background-origin: border-box; */
      /* background-origin: padding-box; */
      /* background-origin: content-box; */
      /* 图片显示的区域 第一个默认 */
      /* background-clip: border-box; */
      /* background-clip: padding-box; */
      /* background-clip: content-box; */
      /* 固定背景图片 */
      /* background-attachment: scroll; */
      background-attachment: fixed;
    }
    #app{
      height:200%;
    }
  </style>
</head>
<body>
  <div id="main">
    <div id="app">app</div>
  </div>
</body>
</html>